<!doctype html>
{% load static %}
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>个人中心</title>
    <link href="{% static 'css/css.css' %}" rel="stylesheet" type="text/css">
    <script src="{% static 'admin/js/jquery.min.js' %}"></script>
    <!-- import CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>

<body>

{% include 'header.html' %}

<div class="ge_main" id="app">
    <div class="ge_wrap">
        <div class="ge_left">
            <div class="ge_title">个人中心</div>
            <div class="ge_leftlist">
                <ul>
                    <li><a href="personal/information.html" target="iframe">基本资料</a></li>
                    <li><a href="personal/collection.html" target="iframe">我的收藏</a></li>
                    <li><a href="personal/feedback.html" target="iframe">我的消息</a></li>
                </ul>
            </div>
        </div>
        <div class="ge_right">
            <iframe id="iframe" src="personal/information.html" name="iframe"
                    width="870px" height="900px"
                    style="border: none" scrolling="no">

            </iframe>
        </div>
    </div>
    <el-backtop></el-backtop>
</div>

{% include 'footer.html' %}
</body>
<!-- import Vue before Element -->
<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14"></script>
<!-- import JavaScript -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script>
    new Vue({
        el: '#app',
        data: function() {
            return { visible: false }
        }
    })
</script>
<script>
    window.onload = function () {
        if (!"{{request.session.user}}") {
            window.location.href = "login.html"
        }
        if("collection" == getQueryVariable("type")){
            $("#iframe").attr("src","personal/collection.html")
        }
    }

    //获取地址栏参数
    function getQueryVariable(variable) {
        var query = window.location.search.substring(1);
        var vars = query.split("&");
        for (var i = 0; i < vars.length; i++) {
            var pair = vars[i].split("=");
            if (pair[0] == variable) {
                return pair[1];
            }
        }
        return (false);
    }
</script>
</html>
